#ifndef NR_CHANNEL_MANAGER_H
#define NR_CHANNEL_MANAGER_H

#include "nr_channel_input.h"
#include "nr_channel_output.h"
#include "nr_device_item_manager.h"

typedef QHash<nr_device_id_t, nr_channel_input*> nr_input_channels;

class nr_channel_manager
{
public:
    nr_channel_manager(nr_device_item_manager& item_manager);

    ~nr_channel_manager();

    nr_error_t create_input_channel(const nr_device_id_t& device_id, nr_channel_input **p_channel_input);
    
    nr_error_t create_output_channel(const nr_device_id_t& device_id, nr_channel_output_delegate& data_delegate, 
        nr_channel_output *&p_channel_output);
    
    nr_error_t destroy_output_channel(nr_channel_output *channel_output);
    
private:
    nr_input_channels m_input_channels;
    nr_device_item_manager& m_item_manager;
};

#endif // NR_CHANNEL_MANAGER_H
